package com.design.pattern.adapter;


//通过构造函数把源传递到适配器类中
public class LogAdapter2 implements LogWriteDbService{

    // 源 Adaptee
    private LogWriteFileService logWriteFileService;

    public LogAdapter2(LogWriteFileService logWriteFileService){
        this.logWriteFileService = logWriteFileService;
    }


    @Override
    public void logWriteDb(LogBean logBean) {
        System.out.println(">>>写入到数据库中..");
        logWriteFileService.logWriteFile();
    }
}
